package gui;

import java.awt.Color;
import java.awt.Rectangle;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Dimension;
import javax.swing.JButton;
import javax.swing.JTextField;

public class MainCustomer extends JFrame{
	private JPanel mainform = null;
	private MainPanel MP;
	private JLabel jLabelWelcome = null;
	private JButton jButtonCatalog = null;
	private JButton jButtonOrder = null;
	private JButton jButtonExit = null;
	private JButton jButtonHelp = null;
	private JButton jButtonCancel = null;
	private JLabel jLabelLogIn = null;
	private JTextField jTextFieldloginInfo = null;	
	
	public MainCustomer() {
		super();
		initialize();
	}

	/**
	 * 
	 */
	private void initialize() {
		this.setSize(1000, 720);
		this.setContentPane(MainClientForm());
		this.setTitle("MAIN SCREEN");	
		
		
	}
	private JPanel MainClientForm() {
		if (mainform == null) {
			jLabelLogIn = new JLabel();
			jLabelLogIn.setBounds(new Rectangle(285, 616, 168, 35));
			jLabelLogIn.setText("YOUR LAST LOGIN WAS ON:");
			jLabelWelcome = new JLabel();
			jLabelWelcome.setBounds(new Rectangle(165, 29, 556, 138));
			jLabelWelcome.setText("WELCOME TO ZER LEHA");
			mainform = new JPanel();
			mainform.setLayout(null);
			mainform.setBackground(Color.CYAN); 
			mainform.add(jLabelWelcome, null);
			mainform.add(getJButtonCatalog(), null);
			mainform.add(getJButtonOrder(), null);
			mainform.add(getJButtonExit(), null);
			mainform.add(getJButtonHelp(), null);
			mainform.add(getJButtonCancel(), null);
			mainform.add(jLabelLogIn, null);
			mainform.add(getJTextFieldloginInfo(), null);
			 


		}
		return mainform; 
	}

	/**
	 * This method initializes jButtonCatalog	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonCatalog() {
		if (jButtonCatalog == null) {
			jButtonCatalog = new JButton();
			jButtonCatalog.setBounds(new Rectangle(315, 210, 318, 74));
			jButtonCatalog.setText("WATCH THE CATALOG");
		}
		return jButtonCatalog;
	}

	/**
	 * This method initializes jButtonOrder	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonOrder() {
		if (jButtonOrder == null) {
			jButtonOrder = new JButton();
			jButtonOrder.setBounds(new Rectangle(315, 316, 318, 74));
			jButtonOrder.setText("MAKE AN ORDER");
			jButtonOrder.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					
					Order1 Order1Frame = new Order1();
					Order1Frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
					Order1Frame.setSize( 600,600 ); // set frame size
					Order1Frame.setResizable(true);
					Order1Frame.setVisible( true ); // display frame
					
				    
				    
				}
			});
		}
		return jButtonOrder;
	}

	/**
	 * This method initializes jButtonExit	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonExit() {
		if (jButtonExit == null) {
			jButtonExit = new JButton();
			jButtonExit.setBounds(new Rectangle(825, 616, 91, 47));
			jButtonExit.setText("EXIT");
			jButtonExit.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					
					ExitFrame EFrame = new ExitFrame();
				    EFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
				    EFrame.setSize( 300,200 ); // set frame size
				    EFrame.setResizable(true);
				    EFrame.setVisible( true ); // display frame
		
				    
				    
				}
			});
		}
		return jButtonExit;
	}

	/**
	 * This method initializes jButtonHelp	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonHelp() {
		if (jButtonHelp == null) {
			jButtonHelp = new JButton();
			jButtonHelp.setBounds(new Rectangle(61, 616, 90, 45));
			jButtonHelp.setText("HELP");
		}
		return jButtonHelp;
	}

	/**
	 * This method initializes jButtonCancel	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonCancel() {
		if (jButtonCancel == null) {
			jButtonCancel = new JButton();
			jButtonCancel.setBounds(new Rectangle(314, 421, 318, 74));
			jButtonCancel.setText("CANCEL AN ORDER");
		}
		return jButtonCancel;
	}

	/**
	 * This method initializes jTextFieldloginInfo	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldloginInfo() {
		if (jTextFieldloginInfo == null) {
			jTextFieldloginInfo = new JTextField();
			jTextFieldloginInfo.setBounds(new Rectangle(465, 616, 137, 35));
		}
		return jTextFieldloginInfo;
	}
	
}  //  @jve:decl-index=0:visual-constraint="26,28"
